home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2004 #2 / Amiga Plus CD - 2004 - No. 02.iso / AmigaPlus / Tools / Development / RxMUI / Examples / Cycle.rexx < prev    next >
Encoding:
OS/2 REXX Batch file  |  2004-01-31  |  2.0 KB  |  78 lines

  1. /* Shows BAD BAD BAD notify */
  2.  
  3. signal on halt
  4. signal on break_c
  5.  
  6. l="rmh.library";if ~show("L",l) then;if ~addlib(l,0,-30) then exit
  7. if AddLibrary("rexxsupport.library","rxmui.library")~=0 then exit
  8.  
  9. call createApp
  10. call handleApp
  11.  
  12. /***********************************************************************/
  13. handleApp: procedure
  14.     ctrl_c=2**12
  15.     do forever
  16.         call NewHandle("app","h",ctrl_c)
  17.         if h.event="QUIT" then exit
  18.         else interpret h.event
  19.     end
  20. /* never reached */
  21. /***********************************************************************/
  22. err: procedure expose sigl rxmuierror
  23. parse arg res
  24. say sigl "["res"]"
  25.     say getrxmuistring(res) "in line" sigl-1 rxmuierror
  26.     exit
  27. /***********************************************************************/
  28. createApp: procedure
  29.     app.Title="Cycle"
  30.     app.Version="$VER: Cycle 1.0 (10.12.99)"
  31.     app.Copyright="©1999, alfie"
  32.     app.Author="alfie"
  33.     app.Description="Cycle example"
  34.     app.Base="EXAMPLE"
  35.     app.SubWindow="WIN"
  36.      win.ID="MAIN"
  37.      win.Title="Cycle Example"
  38.      win.Contents="MGROUP"
  39.  
  40.       mgroup.0=text(,ParseText("
  41. This is an example of %bBAD%n\n
  42. Dead End Notifies"))
  43.  
  44.       mgroup.1=vspace()
  45.  
  46.       mgroup.2="vg"
  47.        vg.class="group"
  48.        vg.horiz=1
  49.        vg.Frame="group"
  50.        vg.Background="groupback"
  51.         vg.0=hspace()
  52.         vg.1="hg"
  53.          hg.class="group"
  54.           hg.0="radio"
  55.            radio.class="radio"
  56.            radio.horiz=1
  57.            radio.entries="1|2|3"
  58.           hg.1=MakeObj("cycle","cycle","uno|due|tre")
  59.          vg.2=hspace()
  60.  
  61.        mgroup.3=hspace()
  62.  
  63.     if NewObj("APPLICATION","APP")>0 then exit
  64.  
  65.     call Notify("WIN","CLOSEREQUEST",1,"APP","RETURNID","QUIT")
  66.     call Notify("cycle","active","everytime","radio","set","active",triggervalue)
  67.     call Notify("radio","active","everytime","cycle","set","active",nottriggervalue)
  68.  
  69.     call set("win","open",1)
  70.  
  71.     return
  72. /***********************************************************************/
  73. halt:
  74. break_c:
  75.     exit
  76. /**************************************************************************/
  77.  
  78.